Skip to content

Conversation

jzwick
Copy link
Contributor

@jzwick jzwick commented Oct 8, 2025

This PR adds a test for a reported issue (first reported 4years ago) which is no longer present on main. Adding this test ensures that the behavior remains and isn't accidentally reverted.

I think maybe this is the PR that fixed the issue - I tried to confirm but ran into build issues when trying to build from before that commit from nearly 3years ago.

@jzwick jzwick marked this pull request as ready for review October 15, 2025 16:34

def test_assert_frame_equal_nested_df_na():
# GH#43022
inner = DataFrame({"a": [1, pd.NA]})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears the original issue tests with np.nan. Could you pytest.mark.parametrize this test with np.nan and pd.NA?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, and also added None

@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Oct 15, 2025
@mroeschke mroeschke added this to the 3.0 milestone Oct 15, 2025
@mroeschke mroeschke merged commit 9ffdf03 into pandas-dev:main Oct 15, 2025
41 of 42 checks passed
@mroeschke
Copy link
Member

Thanks @jzwick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Testing pandas testing functions or related to the test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: pd.testing.assert_frame_equal fails if nested DataFrame contains np.nan

2 participants